#include "maintainworktimestampsthread.h"

KMaintainWorkTimestampsThread::KMaintainWorkTimestampsThread(int *startWorkTimestamp, int *stopWorkTimestamp)
{
	keylogger = new KKeylogger(startWorkTimestamp, stopWorkTimestamp);
}

KMaintainWorkTimestampsThread::~KMaintainWorkTimestampsThread()
{
}

void KMaintainWorkTimestampsThread::run()
{
	if (keylogger->xConnect(getenv("DISPLAY")))
	{
		keylogger->start();
		while (1)
		{
			keylogger->processData();
			usleep(1000000 / 3);
		}
	}
}
